package soundwave.com.demo.activity;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebResourceRequest;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.TextView;

import soundwave.com.demo.R;

/**
 * Created by xu on 2017/4/29.
 */

public class Headlines_webview extends Activity {
    private TextView back;
    private TextView title;
    private TextView share;
    private WebView headlines_webview;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.headlines_list_item_webview);
        initView();
        onclik();
        headlines_webview.getSettings().setJavaScriptEnabled(true);
        headlines_webview.getSettings().setUseWideViewPort(true);
        headlines_webview.getSettings().setLoadWithOverviewMode(true);
        headlines_webview.loadUrl("https://www.baidu.com");

    }

    private void initView() {
        back = (TextView) findViewById(R.id.back);
        title = (TextView) findViewById(R.id.title);
        share = (TextView) findViewById(R.id.share);
        headlines_webview = (WebView) findViewById(R.id.headlines_webview);
    }

    private void onclik() {
        back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });


    }
}
